<!--营业概况-->
<template>
  <div>
    <div class="header-right">
      <el-button v-show="activeName2=='first'" class="float-left btn" type="primary" round>{{lang._106}}</el-button>

      <el-input v-show="activeName2=='first'" class="float-left search-input" width="150" :placeholder="lang._219"></el-input>
      <el-date-picker  v-show="activeName2!='first'" class="dataTime float-left" v-model="dataTime" type="datetimerange" :picker-options="pickerOptions2" range-separator="|"
        start-placeholder="2018-3-13 0:00:00" end-placeholder="2018-3-13 24:00:00" align="right">
      </el-date-picker>
      <el-button class="float-left search-btn" type="primary" round>{{lang._012}}</el-button>
      <!-- 次卡搜索 -->
    </div>
    <el-tabs v-model="activeName2" type="card" @tab-click="handleClick">
      <el-tab-pane :label="lang._218" name="first">
        <el-table class="text-center tables" :data="tableData1" stripe header-cell-style="color:#409eff;background:#edf5ff">
          <el-table-column prop="uid" :label="lang._045" width="40">
          </el-table-column>
          <el-table-column prop="operate" :label="lang._028" width="100">
            <template slot-scope="scope">
              <el-button type="text">{{lang._078}}</el-button>
            </template>
          </el-table-column>
          <el-table-column prop="openCarmen" :label="lang._165" width="312">
          </el-table-column>
          <el-table-column prop="timeCardName" :label="lang._219" width="160">
          </el-table-column>
          <el-table-column prop="consumables" :label="lang._220" width="350">
          </el-table-column>
          <el-table-column prop="availableNumber" :label="lang._221" width="160">
          </el-table-column>
          <el-table-column prop="salePrice" :label="lang._222" width="160">
          </el-table-column>
          <el-table-column prop="serviceLife" :label="lang._223" width="160">
          </el-table-column>
          <el-table-column prop="pushMoney" :label="lang._224">
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <!-- 营销概况的详情标签页 -->
      <el-tab-pane :label="lang._234" name="second">
        <el-table class="text-center tables" :data="tableData2" stripe header-cell-style="color:#409eff;background:#edf5ff">
          <el-table-column prop="openCarmen" :label="lang._165">
          </el-table-column>
          <el-table-column prop="timeCardName" :label="lang._219" width="160">
          </el-table-column>
          <el-table-column prop="price" :label="lang._091" width="80">
          </el-table-column>
          <el-table-column prop="Time" :label="lang._225" width="80">
          </el-table-column>
          <el-table-column prop="price_Time" :label="lang._226" width="80">
          </el-table-column>
          <el-table-column :label="lang._227">
            <el-table-column prop="timeCardNumber" :label="lang._230" width="80">
            </el-table-column>
            <el-table-column prop="totalTimeCardNumber" :label="lang._231" width="80">
            </el-table-column>
            <el-table-column prop="totalPrices" :label="lang._232" width="80">
            </el-table-column>
          </el-table-column>
          <el-table-column :label="lang._228">
            <el-table-column prop="timeCardNumber1" :label="lang._230" width="80">
            </el-table-column>
            <el-table-column prop="totalTimeCardNumber1" :label="lang._231" width="80">
            </el-table-column>
            <el-table-column prop="totalPrices1" :label="lang._232" width="80">
            </el-table-column>
          </el-table-column>
          <el-table-column :label="lang._229">
            <el-table-column prop="timeCardNumber2" :label="lang._230" width="80">
            </el-table-column>
            <el-table-column prop="totalTimeCardNumber2" :label="lang._231" width="80">
            </el-table-column>
            <el-table-column prop="totalPrices2" :label="lang._232" width="80">
            </el-table-column>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <!-- 交接班记录的详情标签页 -->
    </el-tabs>
  </div>
</template>
<style lang="less" scoped>
  .header-right {
    position: absolute;
    z-index: 2;
    right: 0;
    height: 60px;
    .btn {
      margin-top: 15px;
      height: 30px;
      line-height: 30px;
      padding: 0 20px;
      margin-left: 20px;
      margin-right: 20px;
    }
    .export-btn {
      margin-top: 15px;
      height: 30px;
      line-height: 30px;
      padding: 0 20px;
      margin-left: 20px;
      margin-right: 20px;
    }
    .search-btn {
      height: 30px;
      line-height: 30px;
      padding: 0 20px;
      margin-top: 15px;
      border-radius: 0 14px 14px 0;
      margin-right: 20px;
    }
    .dataTime{
      border: 1px solid #409eff;
      color: #409eff;
      border-radius: 14px 0 0 14px;
      height: 28px;
      padding: 0;
      margin: 0;
      margin-top: 15px;
      overflow: hidden;
      line-height: 28px;
    }
    .search-input {
      width: 150px;
      border: 1px solid #409eff;
      color: #409eff;
      border-radius: 14px 0 0 14px;
      height: 28px;
      padding: 0;
      margin: 0;
      margin-top: 15px;
      overflow: hidden;
      line-height: 28px;
    }

  }
</style>
<style>
  .el-input__inner {
    line-height: 28px;
    height: 28px;
  }

  .el-tabs__header {
    height: 60px;
    margin: 0;
    background: #FFF;
  }

  .el-tabs__item {
    height: 30px;
    line-height: 30px;
    margin-top: 15px;
    border: none;
    color: #409eff;
    font-size: 15px;
  }

  .el-tabs--card>.el-tabs__header .el-tabs__item {
    border-bottom: none;
    border-left: none;
    margin-left: 20px;
    margin-right: 20px;
  }

  .el-tabs--card>.el-tabs__header .el-tabs__nav {
    border: none;
  }

  .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
    color: #FFF;
    background: #409eff;
    border-radius: 14px;
  }

  .el-tabs__content {
    height: calc(100vh - 61px - 80px);
    background: unset;
  }

  .el-date-editor .el-range-input {
    float: left;
    color: #409eff;
    width: calc(50% - 15px);
  }

  .el-date-editor .el-range-separator {
    float: left;
    color: #409eff;
  }

  .el-date-editor .el-range__icon {
    display: none;
  }

  .el-table {
    margin: 20px;
    width: calc(100% - 40px);
  }

  .el-table th {
    text-align: center !important;
  }

  .el-table th,
  .el-table tr {
    background-color: unset;
  }

  .el-table tr {
    background: #edf5ff;
  }

  .el-table__row {
    background: unset !important;
  }
  .el-table .cell, .el-table th div{
    padding-left: 0;
    padding-right: 0;
  }
</style>


<script>
  export default {
    props: ['lang'],
    data() {
      return {
        activeName2: 'first',
        //初始的选择标签页
        pickerOptions2: {
          shortcuts: [{
            text: '最近一周',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }]
        },
        dataTime: '',
        //时间选择器
        tableData1: [{
          uid:1,
          openCarmen: 'TastOfBlue',
          timeCardName: '假装我是一个很好的次卡',
          consumables: '特大号烤鱼刺',
          availableNumber: '5',
          salePrice: '9.58',
          serviceLife: '永久',
          pushMoney: '无'
        },{
          uid:1,
          openCarmen: 'TastOfBlue',
          timeCardName: '假装我是一个很好的次卡',
          consumables: '特大号烤鱼刺',
          availableNumber: '5',
          salePrice: '9.58',
          serviceLife: '永久',
          pushMoney: '无'
        },{
          uid:1,
          openCarmen: 'TastOfBlue',
          timeCardName: '假装我是一个很好的次卡',
          consumables: '特大号烤鱼刺',
          availableNumber: '5',
          salePrice: '9.58',
          serviceLife: '永久',
          pushMoney: '无'
        },{
          uid:1,
          openCarmen: 'TastOfBlue',
          timeCardName: '假装我是一个很好的次卡',
          consumables: '特大号烤鱼刺',
          availableNumber: '5',
          salePrice: '9.58',
          serviceLife: '永久',
          pushMoney: '无'
        },],
        //营业概况的表格数据
        tableData2: [{
          openCarmen: 'TastOfBlue',
          timeCardName: '洗澡卡',
          price: '80',
          Time: '50',
          price_Time: '1.6',
          timeCardNumber: '80',
          totalTimeCardNumber: '80',
          totalPrices: '80.00',
          timeCardNumber1: '80',
          totalTimeCardNumber1: '80',
          totalPrices1: '80.00',
          timeCardNumber2: '80',
          totalTimeCardNumber2: '80',
          totalPrices2: '80.00',
        },{
          openCarmen: 'TastOfBlue',
          timeCardName: '洗澡卡',
          price: '80',
          Time: '50',
          price_Time: '1.6',
          timeCardNumber: '80',
          totalTimeCardNumber: '80',
          totalPrices: '80.00',
          timeCardNumber1: '80',
          totalTimeCardNumber1: '80',
          totalPrices1: '80.00',
          timeCardNumber2: '80',
          totalTimeCardNumber2: '80',
          totalPrices2: '80.00',
        },{
          openCarmen: 'TastOfBlue',
          timeCardName: '洗澡卡',
          price: '80',
          Time: '50',
          price_Time: '1.6',
          timeCardNumber: '80',
          totalTimeCardNumber: '80',
          totalPrices: '80.00',
          timeCardNumber1: '80',
          totalTimeCardNumber1: '80',
          totalPrices1: '80.00',
          timeCardNumber2: '80',
          totalTimeCardNumber2: '80',
          totalPrices2: '80.00',
        },{
          openCarmen: 'TastOfBlue',
          timeCardName: '洗澡卡',
          price: '80',
          Time: '50',
          price_Time: '1.6',
          timeCardNumber: '80',
          totalTimeCardNumber: '80',
          totalPrices: '80.00',
          timeCardNumber1: '80',
          totalTimeCardNumber1: '80',
          totalPrices1: '80.00',
          timeCardNumber2: '80',
          totalTimeCardNumber2: '80',
          totalPrices2: '80.00',
        },],
        //交接班的表格数据
      };
    },
    methods: {
      handleClick(tab, event) {
        console.log(tab, event);
      }
    }
  }

</script>
